package com.molichuxing.services.infrastructure.dao;

import com.molichuxing.services.infrastructure.bean.GroupResourceBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface GroupResourceMapper {
    /**
     *
     * @mbg.generated
     */
    int insert(GroupResourceBean record);

    /**
     *
     * @mbg.generated
     */
    int insertSelective(GroupResourceBean record);

    /**
     *
     * @mbg.generated
     */
    GroupResourceBean selectByPrimaryKey(Integer id);

    /**
     *
     * @mbg.generated
     */
    int updateByPrimaryKeySelective(GroupResourceBean record);

    /**
     *
     * @mbg.generated
     */
    int updateByPrimaryKey(GroupResourceBean record);

    /**
     * 通过查询条件，查询符合条件的数据
     * @param param
     * @return
     */
    List<GroupResourceBean> getGroupResourceListByParam(@Param("param") Map<String, Object> param);

    /**
     * 批量添加数据
     * @param groupId
     * @param resourceIds
     * @return
     */
    int createBatchGroupResource(@Param("groupId") int groupId, @Param("resourceIds") List<Integer> resourceIds);

    int deleteByGroupId(@Param("groupId") int groupId);

    int deleteByResourceId(@Param("resourceId") int resourceId);
}